package cn.edu.swu.lyt.io;

import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException {
        String sourceFilePath = "C:\\Java\\WorkSpace\\java-web-2025\\images\\img1.jpg";
        String targetFilePath = "C:\\Java\\WorkSpace\\java-web-2025\\images\\img2.jpg";

        FileCopyer copyer = new FileCopyer();
        copyer.copy(sourceFilePath, targetFilePath);

        String url = "https://pic.nximg.cn/file/20220413/33458386_231720972122_2.jpg";
        String targetFilePath2 = "C:\\Java\\WorkSpace\\java-web-2025\\images\\img4.jpg";
        ImageDownLoader downloader = new ImageDownLoader();
        downloader.download(url, targetFilePath2);
    }
}
